# False

falses = False, None, 0, "", [], {}
print(any(falses))  # False

#
print(True == 1)  # True
print(False == 0)  # True
print(2 + False + True)  # 3
#
print(bool('xxx'))  # True
print(bool([]))  # False

# if else

a = 1
if a > 1:
    print("a>1")
else:
    print("a<=1")
#
if a < 10:
    print("A")
elif a < 20:
    print("B")
else:
    print("C")

#
if 0 < a < 2:
    print("0 < a < 2")
#
if 'foo' == 'foo':
    print("'foo'=='foo'")

# is 同一对象
x = y = [1, 2, 3]
z = [1, 2, 3]
print(x == y)  # True
print(x == z)  # True
print(x is y)  # True
print(x is z)  # False
